Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pointer api updates #104

Merged
merged 2 commits into from
Nov 27, 2018
Merged

Pointer api updates #104

merged 2 commits into from
Nov 27, 2018

Conversation

mjcarroll
Copy link
Contributor

Change the free function variants of the image_transport API to no longer depend on needed a SharedPtr .

If you want to create image_transport Publishers or Subscribers as part of the subclass constructor, there was no way to get a shared pointer to the node instance itself to pass in. shared_from_this is not allowed in constructors for reasons listed here: https://en.cppreference.com/w/cpp/memory/enable_shared_from_this

If the previous behavior is desired, there is still the image_transport::ImageTransport object.

Requires ros2/message_filters#14

yechun1 added a commit to intel/ros2_intel_realsense that referenced this pull request Nov 16, 2018
std::shared_ptr is not safe, replace with new pointer API from image_transport (ros-perception/image_common#104)

Signed-off-by: Chris Ye <chris.ye@intel.com>
@yechun1
Copy link
Contributor

yechun1 commented Nov 27, 2018

@mjcarroll Could the PR be merged? this PR is depended by applications which use image_transport APIs.

If there is any issue left, please let me know, may be I could have a try to fix.

@mjcarroll
Copy link
Contributor Author

@yechun1 If you could just give it a quick review, that would be very helpful. After I get another set of eyes on this, then I would be happy to get it merged.

yechun1 added a commit to intel/ros2_intel_realsense that referenced this pull request Nov 27, 2018
std::shared_ptr is not safe, replace with new pointer API from image_transport (ros-perception/image_common#104)

Signed-off-by: Chris Ye <chris.ye@intel.com>
@yechun1
Copy link
Contributor

yechun1 commented Nov 27, 2018

@mjcarroll just reviewed the code, looks good to me.
Verified this PR on depth_image_proc, ros2_intel_realsense and image_publisher. The builds and execution all passed. I think this PR could be merged.

@mjcarroll mjcarroll merged commit 650a93b into ros2 Nov 27, 2018
@mjcarroll mjcarroll deleted the pointer_api_updates branch November 27, 2018 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants